#!/usr/bin/python
#-*- coding: UTF-8

import sys
from unidata import *

d = dict()

for line in sys.stdin:
	if unidata_comment(line):
		continue

	tokens = line.split(';')
	codepoint, upper = tokens[0], tokens[12]

	if not upper:
		continue

	d[unidata_strip(codepoint)] = unidata_split(upper)

for codepoint, replacement in sorted(d.iteritems()):
	print '%06X %s' % (int(codepoint, base=16), ','.join(replacement))
